#coding=utf-8

import fileinput

ATLAS_HEAD = ('name','format','filter','size', 'repeat')


def getTwoNumber(str):
    ret = str.split(':')[-1].split(',')
    return ret

'''
带冒号字符串：key: value 例如：
size: 200,300

'''
def getKeyStr(str):
    return str.split(':')[0]

def getStringValue(str):
    return str.split(':')[-1]

def getIntValue(str):
    return int(getStringValue(str))

def getIntArrValue(str):
    ret = []
    valArr = getStringValue(str).split(',')
    ret.append(int(valArr[0]))
    ret.append(int(valArr[1]))
    return ret

def getStringArrValue(str):
    return getStringValue(str).split(',')

to_list = lambda x: x.replace('{','').replace('}','').split(',')

def getIntArrValue2(str):
    ret = []
    valArr = to_list(str)
    for val in valArr:
        ret.append(int(val))
    return ret